﻿using System;
using System.Threading.Tasks;
using FwProject.Distribution.Dto;
using Abp.Application.Services;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;

namespace FwProject.Distribution
{
    public interface IDistributionDetailsAppService:IApplicationService
    {
        /// <summary>
        /// 创建一个产品配送订单
        /// </summary>
        /// <returns>The create.</returns>
        /// <param name="input">Input.</param>
        Task<Guid> Create(DistributionDetailsInputDto input);

        /// <summary>
        /// 修改配送明细
        /// </summary>
        /// <returns>The create.</returns>
        /// <param name="input">Input.</param>
        Task Update(Guid id,DistributionDetailsInputDto input);
       /// <summary>
       /// 返回型号
       /// </summary>
       /// <returns>The by identifier async.</returns>
       /// <param name="id">Identifier.</param>
        [HttpGet]
        Task<DistributionDetailsDto> GetByIdAsync(Guid id);

        int GetTypeNumberCount(Guid id);

        [HttpGet]
        Task<List<DistributionDetailsDto>> GetDistributionByIdAsync(Guid id);

        Task<List<DistributionDetailsOutInputDto>> GetDistributionDetailsBySettlementIdAsync(Guid settlementId);

        Task<List<DistributionDetailsListDto>> GetByIdDistributionDetailsListAsync(Guid id);
        /// <summary>
        /// 返回配送订单下的所有型号
        /// </summary>
        /// <returns>The paged list async.</returns>
        /// <param name="id">配送定点编号</param>

        [HttpGet]
        Task<X.PagedList.IPagedList<DistributionDetailsDto>> GetPagedListAsync(Guid id);
        [HttpGet]
        Task<List<DistributionDetailsDto>> GetDistributionDetailsDtoListAsync(Guid id);

        Task<X.PagedList.IPagedList<DistributionTypeNumberReportDto>> GetDistributionDetailsListAsync(int pageIdx,int pageSize,DateTime? beginTime, DateTime? endTime,string restaurantName,long? driverName);

        Task<List<DistributionTypeNumberReportDto>> GetDistributionDetailsListsAsync(DateTime? beginTime, DateTime? endTime, string restaurantName, long? driverName);

        Task<List<DistributionTypeNumberReportDto>> GetExportDistributionDetailsAsync(string restaurantName, string driverName, DateTime? beginTime, DateTime? endTime);
        /// <summary>
        /// 应收汇总
        /// </summary>
        /// <returns></returns>
        Task<X.PagedList.IPagedList<ReceivableSummaryListDto>> GetReceivableSummaryListAsync(int pageIdx, int pageSize, DateTime? beginTime, DateTime? endTime);

        Task UpdatePrice(Guid id, decimal price);

        List<DistributionDetailsPrintDto> GetDistributionDetailsPrintList(Guid[] ids);
    }
}
